package ch4;

class Student3{
    int number;
}
public class Example4_21 {
    public static void main(String args[ ]) {
        Student3 stu[] = new Student3[10];  //创建对象数组
        for(int i=0;i<stu.length;i++) {
            stu[i]=new Student3();     //创建Student对象
            stu[i].number = 101+i;
        }
        for(int i=0;i<stu.length;i++) {
            System.out.println(stu[i].number);
        }
    }
}

